@echo off

rem compress files in importdec folder

if not exist import  mkdir  import

rem compress same type as extracted
FOR %%i IN (importdec\*.*) do (
    rem some compressed files need have same/similar size to original, or game crash/freeze
    FOR %%e IN (extracted\%%~nxi.c1) DO if exist "%%e"   ffxcx.exe -c  -s  %%~ze  "%%i"  "import\%%~nxi.c1"
    FOR %%e IN (extracted\%%~nxi.c2) DO if exist "%%e"   ffxcx.exe -c2 -s  %%~ze  "%%i"  "import\%%~nxi.c2"

    rem old, if using read bugs and uncomment in importToIso.bat and importGraphic.bat
    rem if exist extracted\%%~nxi.c1  ffxtool_v03.exe -c   "%%i"  "import\%%~nxi.c1"
    rem if exist extracted\%%~nxi.c2  ffxtool_v03.exe -c2  "%%i"  "import\%%~nxi.c2"
)
